package com.lnsf.bookstore.web.user.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lnsf.bookstore.system.user.dao.UserMapper;
import com.lnsf.bookstore.system.user.dao.UserRoleMapper;
import com.lnsf.bookstore.system.user.vo.User;
import com.lnsf.bookstore.web.user.dao.ApiUserMapper;
import com.lnsf.bookstore.web.user.service.ApiUserService;
import com.lnsf.bookstore.web.user.vo.ApiUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class ApiUserServiceImpl implements ApiUserService {

	@Autowired
	private ApiUserMapper userMapper;

	@Override
	public ApiUser queryByOpenId(String openId) {
		return userMapper.queryByOpenId(openId);
	}

	@Override
	public void save(ApiUser apiUser) {
		userMapper.save(apiUser);
	}

	@Override
	public int updateMoney(Map<String, Object> map) {
		return userMapper.updateMoney(map);
	}

	@Override
	public void update(ApiUser apiUser) {
		userMapper.update(apiUser);
	}

	@Override
	public ApiUser selectById(Integer userId) {
		ApiUser user = userMapper.queryObject(userId);
		return user;
	}





}
